<template>
  <div>
    <div class="f-16 c_text2 mb-16 fw-6">其它设置</div>
    <div class="wrap">
      <div class="block">
        <div class="left"><el-switch size="small" /></div>
        <div class="right">
          <span class="title">新消息提示音设置</span>
          <div class="tips">开启后，若客服分发模块收到新消息，会有提示音提醒您查看</div>
        </div>
      </div>
      <div class="block">
        <div class="left"><el-switch size="small" /></div>
        <div class="right">
          <span class="title">新客户主动发消息后才接入</span>
          <div class="tips">
            开启后，新添加的客户不会马上接入客服系统，需要客户主动发消息后才会接入<br/>
            系统会根据下面添加的文案内容进行消息过滤，如果企微官方新加客户提示文案变了，需及时手动更新下方文案，避免过滤不成功
          </div>
          <span class="title">文案内容</span>
          <el-input 
            class="input"
            placeholder="请输入内容"
            v-model="input1"
            maxlength="50"
            show-word-limit
            :disabled="!blockStatus"
            />
            <el-input 
            class="input"
            placeholder="请输入内容"
            v-model="input2"
            maxlength="50"
            show-word-limit
            :disabled="!blockStatus"
            />
            <el-input 
            class="input"
            placeholder="请输入内容"
            v-model="input3"
            maxlength="50"
            show-word-limit
            :disabled="!blockStatus"
            />
            <div class="bts">
              <div class="flex-btn" v-if="blockStatus">
                <div @click.stop='onTiggerBockOne(false)'>取消</div>
                <div @click.stop='onTiggerBockOne(false)'>保存</div>
              </div>
              <div class="flex-btn" v-else>
                <div @click='onTiggerBockOne(true)'>修改</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
</template>
<script>
export default {
  data() {
    return {
      switchType: false,
      blockStatus: false,
      blockThree: false,
      input1: '我已经添加了你，现在我们可以开始聊天了。',
      input2: '我通过了你的联系人验证请求，现在我们可以开始聊天了',
      input3: '我已經添加了你，現在我們可以開始聊天了。'
    };
  },
  methods: {
    onTiggerBockOne(status) {
      this.blockStatus = status
    }
  },
};
</script>
<style lang="scss" scoped>
.wrap {
  .block {
    position: relative;
    padding: 16px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
    margin-bottom: 16px;
    display: flex;
    .left {
      margin-right: 20px;
    }
    .right {
      .title {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: rgba(0, 0, 0, .85);
        line-height: 22px;
        margin-bottom: 12px;
      }
      .row-item {
        display: flex;
        align-items: center;
        color: rgba(0, 0, 0, .65);
        font-size: 14px;
        margin-bottom: 20px;
        .input {
          width: 100px;
          margin: 0 4px;
        }
      }
      .tips {
        font-size: 12px;
        font-weight: 400;
        color: rgba(0, 0, 0, .45);
        line-height: 20px;
        margin-top: 8px;
        margin-bottom: 16px;
      }
      .input {
        width: 558px;
        height: 32px;
        margin-bottom: 14px;
      }
      .bts {
        position: absolute;
        right: 16px;
        top: 16px;
        .flex-btn {
          display: flex;
          align-items: center;
          div {
            display: block;
            color: #3070ff;
            cursor: pointer;
            font-size: 14px;
            line-height: 22px;
            &:not(:first-child) {
              margin-left: 14px;
            }
          }
        }
      }
    }
  }
}
</style>